<?php if($this->connected){ ?>
<div class="container">
	<div class="row">
	<div class="span8 offset2">
		
	<?php echo $this->form;?>

	</div>
	</div>
	<div class="row">
	<div class="span2"><div class="well-mini">
		<ul class="nav nav-list">
			<li class="nav-header"><?php echo $this->translate('Vehicle'); ?></li>
			<li>
			<a href="<?php echo $this->baseUrl('object/car'); ?>"><?php echo $this->translate('Car'); ?></a>
			</li>
			<li>
			<a href="<?php echo $this->baseUrl('object/motorcycle'); ?>"><?php echo $this->translate('MotorCycle'); ?></a>
			</li>
			<li class="divider"></li>
			<li class="nav-header"><?php echo $this->translate('Real Estate'); ?></li>
			<li>
			<a href="<?php echo $this->baseUrl('object/house'); ?>"><?php echo $this->translate('House'); ?></a>
			</li>
			<li>
			<a href="<?php echo $this->baseUrl('object/apartment'); ?>"><?php echo $this->translate('Apartment'); ?></a>
			</li>
			<li>
			<a href="<?php echo $this->baseUrl('object/land'); ?>"><?php echo $this->translate('Land'); ?></a>
			</li>
			<li>
			<a href="<?php echo $this->baseUrl('object/parking'); ?>"><?php echo $this->translate('Parking'); ?></a>
			</li>
			<li class="divider"></li>
			<li class="nav-header"><?php echo $this->translate('High tech'); ?></li>
			<li>
			<a href="<?php echo $this->baseUrl('object/desktop'); ?>"><?php echo $this->translate('Desktop computer'); ?></a>
			</li>
			<li>
			<a href="<?php echo $this->baseUrl('object/laptop'); ?>"><?php echo $this->translate('Laptop'); ?></a>
			</li>
			<li>
			<a href="<?php echo $this->baseUrl('object/phone'); ?>"><?php echo $this->translate('Phone'); ?></a>
			</li>
			<li>
			<a href="<?php echo $this->baseUrl('object/tv'); ?>"><?php echo $this->translate('TV'); ?></a>
			</li>
			<li class="divider"></li>
			<li class="nav-header"><?php echo $this->translate('Fashion'); ?></li>
			<li>
			<a href="<?php echo $this->baseUrl('object/clothing'); ?>"><?php echo $this->translate('Clothing'); ?></a>
			<li class="divider"></li>
			<li class="nav-header"><?php echo $this->translate('Other'); ?></li>
			<li>
			<a href="<?php echo $this->baseUrl('object/book'); ?>"><?php echo $this->translate('Book'); ?></a>
			<a href="<?php echo $this->baseUrl('object/other'); ?>"><?php echo $this->translate('Other'); ?></a>
			</li>
		</ul>
	</div></div>
	<div class="span6">
	    <div class="tabbable"> <!-- Only required for left/right tabs -->
		    <ul class="nav nav-tabs">
			    <li class="active"><a href="#tab1" data-toggle="tab"><?php echo $this->translate('My Requests')?></a></li>
			    <li><a href="#tab2" data-toggle="tab"><?php echo $this->translate('Latest Requests')?></a></li>
		    </ul>
		    <div class="tab-content">
			    <div class="tab-pane active" id="tab1">
			    	<?php if($this->requests != null){ ?>
						<ul class="thumbnails">
					<?php foreach ($this->requests as $request){ ?>
							<li class="span6">
							<?php  echo $this->action('request', 'request', null, array('id_request' => $request->requestId, 'token' => $this->token));  ?>
						    
						    </li>
					<?php }?>
						</ul>
					<?php }else{?>
					<div class="alert alert-info">
					<?php echo $this->translate('You don\'t make any search yet!')?>
					</div>
					<?php }?>
			    </div>
			    <div class="tab-pane" id="tab2">
			    	<?php if($this->lastrequests != null){ ?>
						<ul class="thumbnails">
					<?php foreach ($this->lastrequests as $request){ ?>
							<li class="span6">
							<?php  echo $this->action('request', 'request', null, array('id_request' => $request->requestId, 'token' => $this->token));  ?>
						    
						    </li>
					<?php }?>
						</ul>
					<?php }else{?>
					<div class="alert alert-info">
					<?php echo $this->translate('No request has been made!')?>
					</div>
					<?php }?>
			    </div>
		    </div>
	    </div>
	
	</div>
	<div class="span4">
	<div class="well-mini">
		<ul class="nav nav-list">
			<li class="nav-header">Coming soon</li>
			<li>
				<input class="input-medium" type="text" placeholder="Add url">
				<button class="btn btn-success dropdown-toggle" data-toggle="dropdown">
				Save
				<span class="icon-refresh icon-white"></span>
				</button>
			</li>
			<li class="divider"></li>
		</ul>
	</div>
	
	<div class="well-mini">
		<ul class="nav nav-list">
			<li class="nav-header">5 Latest Offers</li>
		</ul>
		
		<?php if($this->offers != null){ ?>
		<ul class="nav">
			<?php foreach ($this->offers as $offer){ ?>
			<li>
			<?php  echo $this->action('lastoffer', 'offer', null, array('offer' => $offer));  ?>
		    
		    </li>
			<?php }?>
		</ul>
		<?php }else{?>
		<div class="alert alert-info">
		<?php echo $this->translate('No offer yet') ?>
		</div>
		<?php }?>
		
	</div>
	
	</div>
	</div>
</div>
<?php }else{?>


<div class ="marketing">
<div class="container">
<div class="row">
	<div class="span12">
		<h1><?php echo $this->translate('Youtajeer.com The Trade network.')?></h1>
		<h2><?php echo $this->translate('Better, together.')?></h2>
		<p><?php echo $this->translate('Be awesome on Youtajeer.com. Easily add great products and services, share it with your community and search what you want.')?></p>
		<p>
		<a class="btn btn-info" href="<?php echo $this->baseUrl('login')?>"><?php echo $this->translate('Sign in')?></a>
		
		<a class="btn btn-info" href="<?php echo $this->baseUrl('registration')?>"><?php echo $this->translate('Sign up')?></a>
		</p>
	</div>
</div>
</div>
</div>

<div class ="marketing-grey">
<div class="container">
<div class="row">
	<div class="span4">
		<img class="img-circle"  style="width: 120px; height: 120px;" src="<?php echo $this->baseUrl('img/main/buysale.png')?>">
		<h2><?php echo $this->translate('Buy & Sale')?></h2>
		<p>Créer vos propres produits, vendez et acheter ou louer des produits</p>
	</div>
	<div class="span4">
		<img class="img-circle" style="width: 120px; height: 120px;" src="<?php echo $this->baseUrl('img/main/search.png')?>">
		<h2><?php echo $this->translate('Search')?></h2>
		<p>Un système de recherche pertinent et ludique. Vous pouvez affiner vos recherches afin de recevoir des offres plus précises</p>
	</div>
	<div class="span4">
		<img class="img-circle" style="width: 120px; height: 120px;" src="<?php echo $this->baseUrl('img/main/maps.png')?>">
		<h2><?php echo $this->translate('Google Maps')?></h2>
		<p>Plus besoin de taper une adresse il suffit de glisser le marqueur sur votre position et Hop!! le tour est joué.</p>
	</div>
</div>
</div>
</div>

<div class ="marketing">
<div class="container">
<div class="row">
	<div class="span12">
		<img class="img-rounded"  src="<?php echo $this->baseUrl('img/main/request.png')?>">
		<img class="img-rounded"  src="<?php echo $this->baseUrl('img/main/post.png')?>">
		<h2><?php echo $this->translate('Share your product and what you want with your friends')?></h2>
		<p>Servez vous de système des réseaux sociaux pour diffuser vos produits et partager vos besoin et recherche avec votre entourage.</p>
	</div>
</div>
</div>
</div>

<?php }?>
